#!/bin/bash
cd /root
ls Python-3.7.5.tgz || wget https://repo.huaweicloud.com/python/3.7.5/Python-3.7.5.tgz --no-check-certificate
tar -xvf Python-3.7.5.tgz
cd Python-3.7.5
./configure --prefix=/usr/local/python3.7.5 --enable-loadable-sqlite-extensions --enable-shared --with-openssl=/usr/local/openssl11/
make -j$nproc
make install


cat <<EOF >/usr/local/ascendrc_python3.7.5
export PATH=/usr/local/python3.7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH
EOF
source /usr/local/ascendrc_python3.7.5
/usr/local/python3.7.5/bin/python3.7 -m pip install --upgrade pip
python3 --version
pip3 show pip
~

